//
//  CollectionCell.m
//  MHO
//
//  Created by Hien NV on 6/28/14.
//  Copyright (c) 2014 maihoang. All rights reserved.
//

#import "CollectionCell.h"
#import "Lib.h"

@implementation CollectionCell

- (void)awakeFromNib
{
    // Initialization code
    self.rateView = [MHRateView rateViewFromNib];
    CGRect frame = self.rateView.frame;
    [self.rateView setFrame:CGRectMake(95, 36, frame.size.width, frame.size.height)];
    [self.contentView addSubview:self.rateView];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setApp:(Application *)app {
    _app = app;
    
    [self.appIcon setImageWithURL:[Contants getImageUrl:app.imagePath width:100 height:100]];
    self.appName.text = app.appName;
//    self.appDesc.text = app.detail;
    [self.rateView setRateInt:app.totalVote];
    self.appSize.text = [NSString stringWithFormat:@"%@", app.size];
}

@end
